﻿$(document).ready(function () {
    $('.datepicker').datepicker({
        changeMonth: true,
        changeYear: true
    });
    $('.datepicker').change(function () {
        var date = $(this).val();
        $(this).next().val($.datepicker.formatDate('yy/mm/dd', new Date(date)));
        $(this).val($.datepicker.formatDate('dd/mm/yy', new Date(date)));
    });
});

function Delete() {
    $('#Action').val('Delete');
    $('form').submit();
}

function DeleteOne(id) {
    $('#DelID').val(id);
    $('#Action').val('DeleteOne');
    $('form').submit();
}

function Notify(isSuccess) {
    if (isSuccess == 'True') {
        $('.notification').addClass('success');
        $('.notification').show();
    }
    else if (isSuccess == 'False') {
        $('.notification').addClass('error');
        $('.notification').show();
    }
}